/**
 * 权限工具方法
 * @version V1.0
 */
var Permission = {
	/**
	 * @description 得到共用的权限弹出窗口参数对象，方便其他地方使用
	 * @param {Boolean} isMulti 是否是多选
	 * @param {String} splitChar 分隔符
	 * @param {Function} callback 回调函数
	 * @return {}
	 */
	getPermissionPopupBean : function(multiSelect, splitChar, callback, selectedItems){
		var permissionPopupBean = {
				igrid: true,
				resKey: "ccay.security.permission.tree",
				resPath: "manage/security/permission/permissionTree.html",
				title: "ccay.security.label.listPermission",
				multiSelect: true,
				isMulti: multiSelect,
				splitChar: splitChar,
				width: 383,
				height: 451,
				uniqueKey: "value",
				displayName: "value",
				selectedItems: selectedItems,
				callback: callback
			};
			return permissionPopupBean;
	},
	/**
	 * @description 权限弹出框 封装
	 * @param {Boolean} isMulti 是否是多选
	 * @param {String} splitChar 分隔符
	 * @param {Function} callback 回调函数
	 */
	popPermissionTree : function(isMulti, splitChar, callback, selectedItems,dialogOp){
		var bean=Permission.getPermissionPopupBean(isMulti, splitChar, callback, selectedItems);
		Ccay.Component.popup($.extend(bean,dialogOp), $i18n("ccay.security.label.listPermission"), false, 383, 480);
	}
}